import React from "react";
import './global.scss';
import "./appPublicPath.js";
import { createApp, IAppConfig } from "ice";
import { ConfigProvider, ErrorBoundary, PageLoading } from "@/components";
import requestConfig from "@/utils/T/requestConfig";
import { childConfig } from "@/config";

const appConfig: IAppConfig = {
  request: requestConfig,
  app: {
    rootId: childConfig.rootId,
    parseSearchParams: true,
    addProvider: ConfigProvider,
    ErrorBoundaryFallback: ErrorBoundary,
  },
  router: {
    type: "browser",
    fallback: <PageLoading />,
  },
  icestark: {
    type: "child",
  },
};

createApp(appConfig);
